unit uSysObj;

interface

uses
  Classes, UWorkerInfo;

type
  TSysObj = class(TObject)
  private
    FAppPath: string;
    FWorkerInfo: TWorkerInfo;
    FConfigPath: string;
  public
    constructor Create;
    destructor Destroy; override;

    property AppPath: string read FAppPath write FAppPath;
    property ConfigPath: string read FConfigPath write FConfigPath;
    property WorkerInfo: TWorkerInfo read FWorkerInfo write FWorkerInfo;
  end;

function Sys: TSysObj;

implementation

var
  FSys: TSysObj;

function Sys: TSysObj;
begin
  if not Assigned(FSys) then
    FSys := TSysObj.Create;
  Result := FSys;
end;

{ TSysObj }

constructor TSysObj.Create;
begin
  inherited Create;
  FWorkerInfo := TWorkerInfo.Create;
end;

destructor TSysObj.Destroy;
begin
  FWorkerInfo.Free;
  inherited;
end;

initialization

finalization
  if Assigned(FSys) then
    FSys.Free;

end.
